package com.woniuxy.happylife.datastore.service.impl;

import com.woniuxy.happylife.datastore.dao.ActivityReleaseDao;
import com.woniuxy.happylife.datastore.service.ReviewService;
import com.woniuxy.happylife.entity.ActivityRelease;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 活动、用户动态审核service
 */
@Service
public class ReviewServiceImpl implements ReviewService {

    /**
     * 活动dao
     */
    @Resource
    ActivityReleaseDao activityReleaseDao;

    /**
     * 活动审核
     * @param activityRelease
     * @return
     */
    @Override
    public int reviewRelease(ActivityRelease activityRelease) {
        int i = activityReleaseDao.reviewActivity(activityRelease);
        return i;
    }

    /**
     * 查询活动
     * @param activityRelease
     * @return
     */
    @Override
    public List<ActivityRelease> findRelease(ActivityRelease activityRelease) {
        return activityReleaseDao.findRelease(activityRelease);
    }
}
